
from pydantic import BaseModel, Field
from models.userinfo import UserInfoData
from models.aiquery import AiQueryData
from models.websearch import WebSearchData
from models.upload import UploadData
from typing import Literal, List


class Response(BaseModel):
    msg: Literal['success', 'error'] = Field(default='success', description='是否成功返回结果')
    data: List[UserInfoData | AiQueryData | WebSearchData | UploadData] = Field(default=[], description='数据列表')
    error: str | None = Field(default=None, description='错误说明')
